import { FestivalConfig } from "@/api/marketing/types";

/**
 * 拼团活动列表分页对象
 */
export interface GroupActivityPageVO {
  id: number;
  name: string;
  status: number;
  startTime: string;
  endTime: string;
  numberOfGroupsWaiting: number;
  numberOfGroupsSuccess: number;
}

/**
 * * 拼团类型查询参数
 */
export interface GroupActivityQuery extends PageQuery {
  name?: string;
  status?: number;
  startTime?: string;
  endTime?: string;
}

/**
 * 拼团分页项类型声明
 */
export type GroupActivityePageResult = PageResult<GroupActivityPageVO[]>;

/**
 * 拼团营销的活动商品
 */
export interface GroupActProdSku extends SkuVO {
  id?: number;
  actStore: number;
  actPrice: number;
}

/**
 * 拼团营销对象
 */
export interface GroupTypeForm {
  id?: number;
  name: string;
  startTime: string;
  endTime: string;
  limitHours?: number;
  limitMembers?: number;
  limitBuyTimes?: number; //0代表不限次数, 默认 0
  autoGroup: boolean;
  actProdSkuList?: GroupActProdSku[];
}

/**
 * * 拼团活动选择商品查询参数
 */
export interface SkuQuery extends PageQuery {
  name?: string;
  status?: number;
}

export interface attribute {}

/**
 * 拼团活动列表分页对象
 */
export type SkuPageResult = PageResult<GroupSkuListVO[]>;
/**
 * 拼团活动列表对象
 */
export interface GroupSkuListVO {
  id: number;
  prodId: number;
  name: string;
  pic: string;
  attribute: attribute[];
  supplierPrice: number;
  salePrice: number;
  referencePrice: number;
  remained: number;
}

export interface SkuVO {
  skuId: number;
  name: string;
  attribute: attribute[];
  pic: string;
  prodId: number;
  referencePrice: number;
  remained: number;
  salePrice: number;
  supplierPrice: number;
}
